package com.redoor.app.stake.workflow.service;

import com.redoor.app.stake.workflow.model.BaseWorkorder;

/**
 * Created by wangjunlei on 2018/3/30.
 */
public interface BaseWorkOrderRedisService {

    /**
     * 设置workorder 到 redis，根据组织机构存放，用于新工单提醒
     * REDIS_REMIND_WORKORDER_PRE:ORGCODE uuid object
     * @param baseWorkorder
     */
    void putRemindWorkOrderToRedis(BaseWorkorder baseWorkorder);

    /**
     *
     * @param orgno
     * @return
     */
    BaseWorkorder getRemindWorkOrderFromRedis(String orgno);

    /**
     * 提醒点击后或者工单处理了，则将新工单从缓存中删除
     * @param orgcode 组织机构
     * @param uuid 工单主键
     */
    void deleteRemindWorkOrderFromRedis(String orgcode,String uuid);

    /**
     * 根据uuid从缓存中获取工单对象
     * @param uuid
     * @return
     */
    BaseWorkorder getWorkOrderFromRedis(String uuid);

    /**
     * 设置工单到缓存，用于单个查询
     * @param baseWorkorder
     */
    void putWorkOrderToRedis(BaseWorkorder baseWorkorder);


}
